package cn.itsy.dao.sys_user_role;

import cn.itsy.pojo.SysUserRole;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * @description:
 * @author: MisterGay
 * @date: 2019-06-17 9:30
 */
@Repository("sysUserRoleDaoImpl")
public class SysUserRoleDaoImpl implements SysUserRoleDao {
    @Resource(name = "jdbcTemplate")
    private JdbcTemplate jdbcTemplate;

    @Override
    public void saveSysUserRole(String sql, SysUserRole sysUserRole) {
        this.jdbcTemplate.update(sql, sysUserRole.getId(), sysUserRole.getUserId(), sysUserRole.getRoleId(),
                sysUserRole.getIsEnabled());
    }
}
